<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Music-Player: MediaLibrary Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Music-Player
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.2 -->
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_media_library.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_media_library-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">MediaLibrary Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Header for the class <a class="el" href="class_media_library.html" title="Header for the class MediaLibrary.">MediaLibrary</a>.  
 <a href="class_media_library.html#details">More...</a></p>

<p><code>#include &lt;MediaLibrary.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ae55f73b8304aef586d5eaf0922a931d0"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_media_library.html#ae55f73b8304aef586d5eaf0922a931d0">~MediaLibrary</a> ()</td></tr>
<tr class="memdesc:ae55f73b8304aef586d5eaf0922a931d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">DTor of class <a class="el" href="class_media_library.html" title="Header for the class MediaLibrary.">MediaLibrary</a>.  <a href="#ae55f73b8304aef586d5eaf0922a931d0"></a><br/></td></tr>
<tr class="separator:ae55f73b8304aef586d5eaf0922a931d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f2f21a4100e2cffe763ce0167feed9b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_album.html">Album</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_media_library.html#a0f2f21a4100e2cffe763ce0167feed9b">CreateAlbum</a> (std::string const &amp;albumname, std::string const &amp;albuminterpret)</td></tr>
<tr class="memdesc:a0f2f21a4100e2cffe763ce0167feed9b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function to create a new <a class="el" href="class_album.html" title="Header for the Album class.">Album</a> and push it back to the list.  <a href="#a0f2f21a4100e2cffe763ce0167feed9b"></a><br/></td></tr>
<tr class="separator:a0f2f21a4100e2cffe763ce0167feed9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3ba3884c51332296eb45ee651bc15e8f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_music_collection.html">MusicCollection</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_media_library.html#a3ba3884c51332296eb45ee651bc15e8f">CreateCollection</a> (std::string const &amp;collectionname)</td></tr>
<tr class="memdesc:a3ba3884c51332296eb45ee651bc15e8f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function to create a new <a class="el" href="class_music_collection.html" title="Represents a music collection.">MusicCollection</a> and push it back to the list.  <a href="#a3ba3884c51332296eb45ee651bc15e8f"></a><br/></td></tr>
<tr class="separator:a3ba3884c51332296eb45ee651bc15e8f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a047115f2974fc0bf91af92167d34c8b1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_song.html">Song</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_media_library.html#a047115f2974fc0bf91af92167d34c8b1">CreateSong</a> (std::string name, std::string interpret, <a class="el" href="class_album.html">Album</a> *album, <a class="el" href="struct_t_duration.html">TDuration</a> duration)</td></tr>
<tr class="memdesc:a047115f2974fc0bf91af92167d34c8b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function to create a new <a class="el" href="class_song.html" title="Header for the Song class.">Song</a> and push it back to the list.  <a href="#a047115f2974fc0bf91af92167d34c8b1"></a><br/></td></tr>
<tr class="separator:a047115f2974fc0bf91af92167d34c8b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Header for the class <a class="el" href="class_media_library.html" title="Header for the class MediaLibrary.">MediaLibrary</a>. </p>
<p>Represents the media library which contains all created <a class="el" href="class_music_media.html" title="Represents MusicMedia.">MusicMedia</a> (Factory pattern)</p>
<p>The class <a class="el" href="class_media_library.html" title="Header for the class MediaLibrary.">MediaLibrary</a> is able to allocate memory for new Songs, Albums and MusicCollections. The pointer of the newly created media will be stored in the list of the library. This is needed for freeing the allocated memory at destruction of an <a class="el" href="class_object.html" title="Common Baseclass for all other classes.">Object</a>.</p>
<dl class="section author"><dt>Author</dt><dd>Andreas Lehner </dd></dl>
<dl class="section date"><dt>Date</dt><dd>06.12.2012 </dd></dl>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ae55f73b8304aef586d5eaf0922a931d0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">MediaLibrary::~MediaLibrary </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>DTor of class <a class="el" href="class_media_library.html" title="Header for the class MediaLibrary.">MediaLibrary</a>. </p>
<p>The destructor is used to free all allocated memory for the music medias. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a0f2f21a4100e2cffe763ce0167feed9b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_album.html">Album</a> * MediaLibrary::CreateAlbum </td>
          <td>(</td>
          <td class="paramtype">std::string const &amp;&#160;</td>
          <td class="paramname"><em>albumname</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string const &amp;&#160;</td>
          <td class="paramname"><em>albuminterpret</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function to create a new <a class="el" href="class_album.html" title="Header for the Album class.">Album</a> and push it back to the list. </p>
<p>The function creates a <a class="el" href="class_album.html" title="Header for the Album class.">Album</a> and pushes it back to the list mLibrary. Only pointers will be stored. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">albumname</td><td>The name of the <a class="el" href="class_album.html" title="Header for the Album class.">Album</a> </td></tr>
    <tr><td class="paramname">albuminterpret</td><td>The name of the interpret of the <a class="el" href="class_album.html" title="Header for the Album class.">Album</a> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Album* The newly created album </dd></dl>

</div>
</div>
<a class="anchor" id="a3ba3884c51332296eb45ee651bc15e8f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_music_collection.html">MusicCollection</a> * MediaLibrary::CreateCollection </td>
          <td>(</td>
          <td class="paramtype">std::string const &amp;&#160;</td>
          <td class="paramname"><em>collectionname</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function to create a new <a class="el" href="class_music_collection.html" title="Represents a music collection.">MusicCollection</a> and push it back to the list. </p>
<p>The function creates a <a class="el" href="class_music_collection.html" title="Represents a music collection.">MusicCollection</a> and pushes it back to the list mLibrary. Only pointers will be stored. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">collectionname</td><td>The name of the <a class="el" href="class_music_collection.html" title="Represents a music collection.">MusicCollection</a> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>MusicCollection* The newly created music collection </dd></dl>

</div>
</div>
<a class="anchor" id="a047115f2974fc0bf91af92167d34c8b1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_song.html">Song</a> * MediaLibrary::CreateSong </td>
          <td>(</td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>interpret</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_album.html">Album</a> *&#160;</td>
          <td class="paramname"><em>album</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_t_duration.html">TDuration</a>&#160;</td>
          <td class="paramname"><em>duration</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function to create a new <a class="el" href="class_song.html" title="Header for the Song class.">Song</a> and push it back to the list. </p>
<p>The function creates a <a class="el" href="class_song.html" title="Header for the Song class.">Song</a> and pushes it back to the list mLibrary. Only pointers will be stored. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>The name of the <a class="el" href="class_song.html" title="Header for the Song class.">Song</a> </td></tr>
    <tr><td class="paramname">interpret</td><td>The name of the interpret of the <a class="el" href="class_song.html" title="Header for the Song class.">Song</a> </td></tr>
    <tr><td class="paramname">album</td><td>The <a class="el" href="class_album.html" title="Header for the Album class.">Album</a> the song belongs to </td></tr>
    <tr><td class="paramname">duration</td><td>The duration of the <a class="el" href="class_song.html" title="Header for the Song class.">Song</a> in minutes and seconds </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Song* The newly created song </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_media_library.html">MediaLibrary</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.2 </li>
  </ul>
</div>
</body>
</html>
